package com.tianhui.consignortwofei.mvp.ui.fragment.display;

import com.fgs.common.CommonPresenter;
import com.fgs.common.CommonView;
import com.tianhui.consignortwofei.R;
import com.tianhui.consignortwofei.base.BaseFragment;
import com.tianhui.consignortwofei.interf.IChartViewInfo;
import com.tianhui.consignortwofei.interf.OnDisplayDataShowListener;
import com.tianhui.consignortwofei.widget.BarChartView;

import java.util.List;

import butterknife.BindView;

/**
 * @author fgs
 * @date 2021/6/16
 * @description
 **/
public class BarDisplayDataFragment extends BaseFragment implements OnDisplayDataShowListener {

    @BindView(R.id.fragment_display_data_bar_driverBarCharView)
    BarChartView driverBarChartView;

    @BindView(R.id.fragment_display_data_bar_carBarCharView)
    BarChartView carBarChartView;
    @BindView(R.id.fragment_display_data_bar_orderBarCharView)
    BarChartView orderBarChartView;
    @BindView(R.id.fragment_display_data_bar_freightBarCharView)
    BarChartView freightBarChartView;


    @Override
    protected int getLayoutId() {
        return R.layout.fragment_display_data_bar;
    }

    @Override
    protected CommonView createView() {
        return null;
    }

    @Override
    protected CommonPresenter createPresenter() {
        return null;
    }

    @Override
    protected void init() {

    }

    @Override
    public void showNewDriverDisplayData(List<IChartViewInfo> list) {
        driverBarChartView.setBarChartData(list);
    }

    @Override
    public void showNewCarDisplayData(List<IChartViewInfo> list) {
        carBarChartView.setBarChartData(list);
    }

    @Override
    public void showNewOrderDisplayData(List<IChartViewInfo> list) {
        orderBarChartView.setBarChartData(list);
    }

    @Override
    public void showNewFreightDisplayData(List<IChartViewInfo> list) {
        freightBarChartView.setBarChartData(list);
    }
}
